<template>
  <div>
    <el-tabs v-model="activeName" type="border-card" @tab-click="tabClick">
      <el-tab-pane label="待办项目" name="noFinish">
        <keep-alive>
          <no-finish ref="noFinish" @toIt="toIt" :switch="true" :source="source"></no-finish>
        </keep-alive>
      </el-tab-pane>
      <el-tab-pane label="资产信息" name="it" :disabled="itType">
        <edit-it-item ref="it" @toIndex="toIndex" :switch="itSwitch"></edit-it-item>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import NoFinish from './no-finish.vue'
import EditItItem from '@/components/Bid/EditIt.vue'
export default {
  name: 'BidEnsure',
  components: {
    NoFinish, EditItItem,
  },
  props: {

  },
  data () {
    return {
      activeName: 'noFinish',
      true: true,
      false: false,
      itSwitch: false,
      status: '5',
      itType: true,
      source: '2',
      page: ''
    }
  },
  created () {
  },
  mounted () {
    this.init()
  },
  methods: {
    init () {
      this.activeName = 'noFinish'
    },
    tabClick (tab) {
      if (tab.name === 'noFinish') {
        this.$refs.noFinish.init()
      } else if (tab.name === 'it') {
        this.$refs.it.init()
      }
    },
    toIt (val, page) {
      this.itType = false
      this.itSwitch = false
      this.page = page
      this.activeName = 'it'
      this.$refs.it.init()
    },
    toIndex (val) {
      this.activeName = 'noFinish'
    },
  },
  computed: {

  },
}
</script>
<style lang="scss" scoped>
</style>
